<?php 

class LoginController extends Controller{
	private $db;
	public function __init()
	{
		$this->db=new AdminModel;
	}
	public function index()
	{
		if (IS_POST) {
			if ($this->db->login($_POST)) {
				$this->success('登录成功',__MODULE__);
			}else{
				$this->error($this->db->error);
			}
		}else{
			$this->display('login.html');
		}
	}
}

 ?>